package com.system.service;

import com.system.dao.EmployeeMapper;
import com.system.pojo.Employee;

import java.util.List;
import java.util.Map;

/**
 * Created by 陈文杰 on 2022/6/6 14:58
 */
public class EmployeeServiceImpl implements EmployeeService{

    private EmployeeMapper employeeMapper;

    public void setEmployeeMapper(EmployeeMapper employeeMapper) {
        this.employeeMapper = employeeMapper;
    }

    @Override
    public List<Employee> queryEmployeeAll() {
        return employeeMapper.queryEmployeeAll();
    }

    @Override
    public Employee queryEmployeeByEmpId(int empId) {
        return employeeMapper.queryEmployeeByEmpId(empId);
    }

    @Override
    public Employee queryEmployeeByEmpName(String empName) {
        return employeeMapper.queryEmployeeByEmpName(empName);
    }

    @Override
    public List<Employee> queryEmployeeByEmpDeptId(int empDeptId) {
        return employeeMapper.queryEmployeeByEmpDeptId(empDeptId);
    }

    @Override
    public List<Employee> queryEmployeeByEmpDeptName(String empDeptName) {
        return employeeMapper.queryEmployeeByEmpDeptName(empDeptName);
    }

    @Override
    public List<Employee> queryEmployeeByEmpPost(String empPost) {
        return employeeMapper.queryEmployeeByEmpPost(empPost);
    }

    @Override
    public int addEmployeeAll(Employee employee) {
        return employeeMapper.addEmployeeAll(employee);
    }

    @Override
    public int updateEmployeeByEmpId(Map<String,Object> map) {
        return employeeMapper.updateEmployeeByEmpId(map);
    }

    @Override
    public int updateEmployeeByEmpName(Map<String,Object>map) {
        return employeeMapper.updateEmployeeByEmpName(map);
    }

    @Override
    public int deleteEmployeeByEmpId(int empId) {
        return employeeMapper.deleteEmployeeByEmpId(empId);
    }

    @Override
    public int deleteEmployeeByEmpName(String empName) {
        return employeeMapper.deleteEmployeeByEmpName(empName);
    }

    @Override
    public int deleteEmployeeByEmpDeptId(int empDeptId) {
        return employeeMapper.deleteEmployeeByEmpDeptId(empDeptId);
    }

    @Override
    public int deleteEmployeeByEmpDeptName(String empDeptName) {
        return employeeMapper.deleteEmployeeByEmpDeptName(empDeptName);
    }

    @Override
    public int deleteEmployeeByEmpPost(String empPost) {
        return employeeMapper.deleteEmployeeByEmpPost(empPost);
    }
}
